package com.syan.learn.optimization.ch02.decorator;

public class PacketHTMLHeaderCreator extends PacketDecorator {

	public PacketHTMLHeaderCreator(IPacketCreator component) {
		super(component);
	}

	@Override
	public String handleContent() {
		StringBuffer buffer = new StringBuffer();
		buffer.append("<html>");
		buffer.append("<body>");
		buffer.append(component.handleContent());
		buffer.append("</body>");
		buffer.append("</html>");
		buffer.append("\n");
		return buffer.toString();
	}

}
